/*
 * @Author: wuhao930406 1148547900@qq.com
 * @Date: 2023-07-27 13:45:19
 * @LastEditors: wuhao930406 1148547900@qq.com
 * @LastEditTime: 2023-07-27 14:00:13
 * @FilePath: /legion-iot/src/pages/system/sensor/columns.js
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
 */
import { Image, Switch } from "antd";
import { EyeFilled } from "@ant-design/icons";

function getcolumns(enable) {
  return {
    columns: [
      { title: "传感器名称", dataIndex: "name", key: "name" },
      // {
      //   title: "设备",
      //   dataIndex: "device_id",
      //   key: "device_id",
      //   valueType: "select",
      //   options: {
      //     path: "/device",
      //     params: {
      //       is_all: 1,
      //     },
      //   },
      //   search: false,
      // },
      { title: "传感器sn", dataIndex: "sn", key: "sn", search: false },
      {
        title: "传感器类型",
        dataIndex: "sensor_type",
        key: "sensor_type",
        valueType: "select",
        options: {
          path: "/sensor/sensor_types",
          params: {},
          tlabel: "name",
          tvalue: "type",
        },
        search: false,
      },
    ],
    pathconfig: {
      enableadd: true,
      enableedit: true,
      enabledelete: true,
      enabledetail: false,
      add: "/sensor",
      edit: "/sensor",
      list: "/sensor",
      delete: "/sensor",
      detail: "",
    },
  };
}
export default getcolumns;
